﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace LianXi1013.Entity.Migrations
{
    public partial class First02 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "MenuInfor",
                columns: table => new
                {
                    MenuInforId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MenuName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MenuURL = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    MenuFid = table.Column<int>(type: "int", nullable: false),
                    SF = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MenuInfor", x => x.MenuInforId);
                });

            migrationBuilder.CreateTable(
                name: "RouteMenuInfor",
                columns: table => new
                {
                    RouteMenuInforId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    MenuInforId = table.Column<int>(type: "int", nullable: false),
                    RouteInforId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RouteMenuInfor", x => x.RouteMenuInforId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "MenuInfor");

            migrationBuilder.DropTable(
                name: "RouteMenuInfor");
        }
    }
}
